<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateQuestionsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('questions', function (Blueprint $table) {
            $table->increments('id')         ->comment('唯一标识');
            $table->string('title',255)      ->nullable()->comment('标题');
            $table->text('question')         ->nullable()->comment('内容');
            $table->integer('type')          ->default(1)->comment('类型');
            $table->text('analyse')          ->nullable()->comment('解析');
            $table->softDeletes();
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        //
    }
}
